<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class CreateOpenShopUserWorkExperience extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('open_shop_user_work_experience', function (Blueprint $table) {
            $table->id();

            $table->string('orderNo', 60)->default('')->comment('订单号');
            $table->tinyInteger('cateringExperience')->default(0)->comment('是否有餐饮经验');
            $table->tinyInteger('joinChainExperience')->default(0)->comment('是否有加盟连锁经验');
            $table->tinyInteger('employmentExperience')->default(0)->comment('是否有自营经验');
            $table->tinyInteger('workLife')->default(0)->comment('工作年限');

            $table->unsignedInteger('createdAt')->default(0)->comment('创建时间');
            $table->unsignedInteger('createdByUid')->default(0)->comment('创建人');
            $table->unsignedInteger('updatedAt')->default(0)->comment('修改时间');
            $table->unsignedInteger('updatedByUid')->default(0)->comment('修改人');

            $table->collation = 'utf8mb4_general_ci';
            $table->unique(['orderNo'], 'idx_orderNo');
            $table->comment = '招商加盟 - 工作经验';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('open_shop_user_work_experience');
    }
}
